package aes.general;

import java.io.Serializable;
import java.util.ArrayList;


/**
 * The Class Exam.An Entity Class contains all information regarding to Exam.
 * Each Instance of Exam represents a different Exam
 */
public class Exam implements Serializable{
	private static final long serialVersionUID = 1L;
	private String ExamId;
	private String TeacherId;
	private int Duration;
	private String Description = null;
	private String ExamSubject;
	private boolean visible;
	private ArrayList<String> Questions = new ArrayList<String>();
	private ArrayList<String> QuestionPoints = new ArrayList<String>();
	private String CourseName ;  //For Dwonloaded Manual Exam Relevant to   Student Manual EXAM EXECUTION
	private String Comments ;    //For Dwonloaded Manual Exam Relevant to   Student  EXECUTION
	private ArrayList<Question> QstManualExam = new ArrayList<Question>();   //For Dwonloaded Manual Exam Relevant to    Student Manual EXAM EXECUTION
	private String StudentId ; // Relevant to Automatic Exam ONLY
	private String actualStudentExamDuration;   //relevant to Automatic and Manual EXECUTION ONLY
	private String actualExamDurationAtEnd;    //relevant to Automatic and Manual EXECUTION ONLY
	private String finishedintime;   //relevant to Automatic and Manual EXECUTION ONLY
	 
	/**
	 * Instantiates a new exam.
	 */
	
	public Exam() {
		super();
	}
	
	/**
	 * Checks if comments are visible to student.
	 *
	 * @return true, if is visible
	 */
	public boolean isVisible() {
		return visible;
	}


	/**
	 * Sets the visible.
	 *  
	 * @param visible 
	 * 				if comments visible must be true,else false
	 */
	public void setVisible(boolean visible) {
		this.visible = visible;
	}

	
	/**
	 * Gets the exam id.
	 *
	 * @return the exam id
	 */
	public String getExamId() {
		return ExamId;
	}

	/**
	 * Sets the exam id.
	 *
	 * @param examId 
	 * 				The new exam id
	 */
	public void setExamId(String examId) {
		ExamId = examId;
	}

	/**
	 * Gets the duration of exam.
	 *
	 * @return the duration 
	 */
	public Integer getDuration() {
		return Duration;
	}
	
	public void setQuestions(ArrayList<String> questions) {
		Questions = questions;
	}

	public void setQuestionPoints(ArrayList<String> questionPoints) {
		QuestionPoints = questionPoints;
	}

	/**
	 * Sets the duration of exam.
	 *
	 * @param dur the new duration
	 */
	public void setDuration(Integer dur) {
		Duration = dur;
	}

	/**
	 * Gets the description.
	 *
	 * @return the description
	 */
	public String getDescription() {
		return Description;
	}

	/**
	 * Sets the description.
	 *
	 * @param description the new description
	 */
	public void setDescription(String description) {
		Description = description;
	}

	/**
	 * Gets the exam subject.
	 *
	 * @return the exam subject
	 */
	public String getExamSubject() {
		return ExamSubject;
	}

	/**
	 * Sets the exam subject.
	 *
	 * @param examSubject the new exam subject
	 */
	public void setExamSubject(String examSubject) {
		ExamSubject = examSubject;
	}

	/**
	 * Gets the questions.
	 *
	 * @return the questions
	 */
	public ArrayList<String> getQuestions() {
		return Questions;
	}

	/**
	 * Sets the questions.
	 *
	 * @param questions the new questions
	 */
	public void setQuestions(String questions) {
		Questions.add(questions);
	}

	/**
	 * Gets the question points.
	 *
	 * @return the question points
	 */
	public ArrayList<String> getQuestionPoints() {
		return QuestionPoints;
	}

	/**
	 * Sets the question points.
	 *
	 * @param questionPoints the new question points
	 */
	public void setQuestionPoints(String questionPoints) {
		QuestionPoints.add(questionPoints);
	}

	/**
	 * Empty questions.
	 */
	public void EmptyQuestions(){
		Questions.clear();
	}
	
	/**
	 * Empty question points.
	 */
	public void EmptyQuestionPoints(){
		QuestionPoints.clear();
	}

	/**
	 * Gets the course name.
	 *
	 * @return the courseName
	 */
	public String getCourseName() {
		return CourseName;
	}

	/**
	 * Sets the course name.
	 *
	 * @param courseName the courseName to set
	 */
	public void setCourseName(String courseName) {
		CourseName = courseName;
	}

	/**
	 * Gets the teacher comments for exam.
	 *
	 * @return the comments
	 */
	public String getComments() {
		return Comments;
	}

	/**
	 * Sets the teacher comments for exam.
	 *
	 * @param comments the comments to set
	 */
	public void setComments(String comments) {
		Comments = comments;
	}

	/**
	 * Gets the List of Questions of Manual exam.
	 *
	 * @return the qstManualExam  List of Questions
	 * 							
	 */
	public ArrayList<Question> getQstManualExam() {
		return QstManualExam;
	}

	/**
	 * Sets  the List of Questions of Manual exam.
	 *
	 * @param qstManualExam the List of Questions to set
	 */
	public void setQstManualExam(ArrayList<Question> qstManualExam) {
		QstManualExam = qstManualExam;
	}

	/**
	 * Gets the student id.
	 *
	 * @return the studentId
	 */
	public String getStudentId() {
		return StudentId;
	}

	/**
	 * Sets the student id.
	 *
	 * @param studentId the studentId to set
	 */
	public void setStudentId(String studentId) {
		StudentId = studentId;
	}
	
	
	/**
	 * Gets the teacher id who wrote the exam.
	 *
	 * @return the teacher id
	 */
	public String getTeacherId() {
		return TeacherId;
	}

	/**
	 * Sets the teacher id.
	 *
	 * @param teacherId the new teacher id
	 */
	public void setTeacherId(String teacherId) {
		TeacherId = teacherId;
	}

	/**
	 * Gets the actual student exam duration.
	 *
	 * @return the actualStudentExamDuration
	 */
	public String getActualStudentExamDuration() {
		return actualStudentExamDuration;
	}

	/**
	 * Sets the actual student exam duration.
	 *
	 * @param actualStudentExamDuration the actualStudentExamDuration to set
	 */
	public void setActualStudentExamDuration(String actualStudentExamDuration) {
		this.actualStudentExamDuration = actualStudentExamDuration;
	}

	/**
	 * Gets the actual exam duration at end.
	 *
	 * @return the actualExamDurationAtEnd
	 */
	public String getActualExamDurationAtEnd() {
		return actualExamDurationAtEnd;
	}

	/**
	 * Sets the actual exam duration at end.
	 *
	 * @param actualExamDurationAtEnd the actual Exam Duration At End to set
	 */
	public void setActualExamDurationAtEnd(String actualExamDurationAtEnd) {
		this.actualExamDurationAtEnd = actualExamDurationAtEnd;
	}

	/**
	 * Gets the Finished in time parameter.
	 *
	 * @return the finishedintime
	 */
	public String getFinishedintime() {
		return finishedintime;
	}

	/**
	 * Sets the Finished in time parameter.
	 *
	 * @param finishedintime 
	 */
	public void setFinishedintime(String finishedintime) {
		this.finishedintime = finishedintime;
	}

	
	
	
	
	
	
	
}
